<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title> 3-5 显示和隐藏（display属性）</title>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <script type="text/javascript">
    function hidetext(){
        var mychar=document.getElementById("con");
        mychar.style.display="none";
    }

    function showtext(){
        var mychar=document.getElementById("con");
        mychar.style.display="block";
    }
    </script>
</head>

<body>
<div align="center">
    <p><a href="../index.php#js" class="fontSize" title="点击进入该目录">目录</a></p>
</div>

<h1>JavaScript</h1>
<p id="con">做为一个Web开发师来说，如果你想提供漂亮的网页、令用户满意的上网体验，JavaScript是必不可少的工具。</p>
<form>
    <input type="button" onclick="hidetext()" value="隐藏内容" />
    <input type="button" onclick="showtext()" value="显示内容" />
</form>



<script type="text/javascript">

</script>

</body>
</html>
